package com.example.kugou.common.wyyid;

import com.example.kugou.common.email.EamilCode;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.HtmlEmail;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public abstract class WyyIdUtil {

    public static String achieveCode(){
        StringBuffer sf = new StringBuffer("wyy");
        String[] beforeShuffle = new String[]{"0","1","2","3","4","5","6","7","8","9","q","w","e","r","t",
        "y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n",
        "m"};
        List list = Arrays.asList(beforeShuffle);
        Collections.shuffle(list);
        StringBuilder sb  = new StringBuilder();
        for (int i = 0; i < list.size(); i++) {
            sb.append(list.get(i));
        }
        String afterShuffle = sb.toString();
        String result = afterShuffle.substring(3, 9);
         String wyyid = sf.append(result).toString();
        return wyyid;
    }

    public static void main(String[] args) {
         String s = achieveCode();
        System.out.println(s);
    }

}
